package com.tnl.web.dao;

import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Repository;
import org.springframework.util.StringUtils;

import com.biz.hunter.db.entity.City;
import com.biz.hunter.dbutil.BaseDAO;
import com.tnl.web.domain.AdminUser;

@Repository
public class AdminUserDAO {
	Logger logger = LoggerFactory.getLogger(AdminUserDAO.class);

	
	private static final String SQL_GET_LIST = "select * from user where id in (";
	private static final String SQL_GET = "select * from user where id = ?";
	
	private static final String GETBYNAME = "select * from user where username =?";



	public AdminUser findByID(Integer id) {
		return  BaseDAO.queryForObject(AdminUser.class, SQL_GET, id);
	}

	public AdminUser findByUsername(String username) {
		return  BaseDAO.queryForObject(AdminUser.class, GETBYNAME, username);

	}

	public AdminUser findUser(String username, String password) {
		// TODO Auto-generated method stub
		return null;
	}

	public List<AdminUser> findAll() {
		// TODO Auto-generated method stub
		return null;
	}

	public List<AdminUser> findAllUsersExceptAdmin() {
		// TODO Auto-generated method stub
		return null;
	}

	public void update(AdminUser user) {
		// TODO Auto-generated method stub
		
	}

	public void save(AdminUser user) {
		// TODO Auto-generated method stub
		
	}


}
